package com.heyige.controller;

import com.heyige.common.CommResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("health")
@Tag(name = "健康检查", description = "系统健康检查接口")
public class HealthController {
    
    @GetMapping
    @Operation(summary = "健康检查", description = "检查系统健康状态")
    public CommResponse<Map<String, Object>> health() {
        Map<String, Object> response = new HashMap<>();
        response.put("status", "UP");
        response.put("timestamp", LocalDateTime.now());
        response.put("service", "heyige-mp-backend");
        response.put("version", "1.0.0");
        return CommResponse.ok(response);
    }
}